package io.rainforest.rss.util;

import lombok.extern.slf4j.Slf4j;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

@Slf4j
public class SqliteDateTest {

    public static void main(String[] args) {
        java.util.Date date = new java.util.Date();
        long datetime = date.getTime();
        log.info("date time {}", datetime);
        long current = System.currentTimeMillis();
        log.info("System.currentTimeMillis() time {}", current);



        String dateTest = "1969-12-31";
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
        try {
            Date test2 = simpleDateFormat.parse(dateTest);
            log.info("SimpleDateFormat time {}", test2.getTime());
        } catch (ParseException e) {
            throw new RuntimeException(e);
        }
    }
}
